
<B_products>
#ANCRE_PAGINATION

<div class="liste-elements products">
<table class='spip liste'>

	<thead>
		<tr class='first_row'>
		<th><a href="#URL_ECRIRE{ecatalogue_products}&order=statut[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]"></a></th>
		<th><a href="#URL_ECRIRE{ecatalogue_products}&order=id_article[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]">ID</a></th>
[(#REM) Артикул]
		[(#CONFIG{ecatalogue/use_module_product_field_sku}|?{
			<th><a href="[(#URL_ECRIRE{ecatalogue_products})]&order=sku[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]"><:ecatalogue:sku:></a></th>
		})]
[(#REM) Название]
        <th><a href="[(#URL_ECRIRE{ecatalogue_products})]&order=titre[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]"><:ecatalogue:product_name:></a></th>
[(#REM) Цена]
		[(#CONFIG{ecatalogue/use_module_product_field_price}|?{
			<!--<th><a href="[(#URL_ECRIRE{ecatalogue_products})]&order=price[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]"><:ecatalogue:price:></a></th>-->
		})]

		<BOUCLE_prices_groups(ecatalogue_prices_group) {is_active=1} {par id_group}>
			<th><:ecatalogue:price:> #ID_GROUP</th>
		</BOUCLE_prices_groups>
[(#REM) Количество]
		[(#CONFIG{ecatalogue/use_module_product_field_quantity}|?{
			<th><a href="[(#URL_ECRIRE{ecatalogue_products})]&order=quantity[&sort_order=(#ENV{sort_order}|=={1}|?{0,1})]"><:ecatalogue:quantity:></a></th>                
		})]
[(#REM) Разделы]
			<th>
				<a>Раздел</a>
				<select id="rub_choose">
					<BOUCLE_rubs2(RUBRIQUES) {id_secteur=2} {tout} {titre==^[[:digit:]]}><option value="&id_rubrique=#ID_RUBRIQUE">#TITRE</option></BOUCLE_rubs2>
				</select>
			</th>
		</tr>
	</thead>
	<tbody>
	<BOUCLE_products(ECATALOGUE_PRODUCTS spip_articles){pagination 50}{id_rubrique?}{branche?}{statut?}{sku ?LIKE #ENV{sku}%}{is_separate?}
        {tri #ENV{order, titre}}{inverse #ENV{sort_order, 0}}>
		<tr class="[(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})]">
			<td class='statut'>[(#ID_ARTICLE|puce_changement_statut{#STATUT,#ID_RUBRIQUE,article})]</td> 
			<td class='id_article'>#ID_ARTICLE</td>
			[(#CONFIG{ecatalogue/use_module_product_field_sku}|?{
				<td class='sku'><a href="[(#URL_ECRIRE{articles, id_article=#ID_ARTICLE})]">#SKU</a></td>
			})]
            <td class='titre'><a href="[(#URL_ECRIRE{articles, id_article=#ID_ARTICLE})]">#TITRE</a></td>
			[(#CONFIG{ecatalogue/use_module_product_field_price}|?{
				<!--<td class='price'> #PRICE</td>-->
			})]
			<BOUCLE_all_groups(ecatalogue_prices_group) {is_active=1} {par id_group}>
				<BOUCLE_price_groups(ecatalogue_prices) {id_article} {id_group} >
					<td class='price #EDIT{price}'> #PRICE </td>
				</BOUCLE_price_groups>
					<td class='price'> 0 </td>
				<//B_price_groups>
			</BOUCLE_all_groups>
			[(#CONFIG{ecatalogue/use_module_product_field_quantity}|?{
				<td class='quantity'>#QUANTITY</td>                   
			})]
			<td>
				<BOUCLE_rubs(RUBRIQUES) {id_rubrique}>
					<a href="#URL_RUBRIQUE">[(#TITRE|supprimer_numero)]</a>
				</BOUCLE_rubs>
			</td>
		</tr>
	</BOUCLE_products>
	</tbody>
</table>
[<p class='pagination'>(#PAGINATION{prive})</p>]
</div>
</B_products>
<div class="liste-elements products"><strong class="caption"><:ecatalogue:no_products:></strong></div>
<//B_products>

<script>
	$('#rub_choose').change(function(){
		var url = location.href.split("&")[0];
		window.location = url+$(this).val();
	});
</script>

